﻿using System;
using System.ComponentModel;

using Warehouse.Service.Data;
using Warehouse.Silverlight.Core.Infrastructure.Events;

namespace Warehouse.Silverlight.Modules.Main.Models
{
    public interface IProductFormModel
    {
        bool IsBusy { get; }
        bool HasChanges { get; }
        bool HasErrors { get; }

        event EventHandler<SubmitOperationEventArgs> SubmitChangesComplete;
        void SubmitChangesAsync();

        void RejectChanges();

        event EventHandler<EntityResultsArgs<Product>> GetProductByIdComplete;
        void GetProductByIdAsync(int id);

        event EventHandler<EntityResultsArgs<Category>> GetCategoriesComplete;
        void GetCategoriesAsync();


        event PropertyChangedEventHandler PropertyChanged;
    }
}
